﻿#pragma once
#include "Control.hpp"
#include <vector>
namespace NAMESPACENAME
{
	class Page;
	/// <summary>
	/// 可以滚动的控件
	/// </summary>
	class ScrollableControl :
		public Control
	{
	protected:
		/// <summary>
		/// 水平滚动条和垂直滚动条的窗口句柄
		/// </summary>
		HWND horizontalScrollBar, verticalScrollBar;
		ScrollableControl(const NAMESPACENAME::Rectangle& rect, ContainerControl* parent);
		// 含有的页面
		std::vector<Page*> pages;
		// 当前页面
		size_t currectPage;
	public:
		virtual void OnSize(SizeEventArgs&)override;
		virtual void OnSizing(SizingEventArgs&)override;
		virtual void OnHorizontalScroll(ScrollEventArgs&)override;
		virtual void OnVerticalScroll(ScrollEventArgs&)override;
		virtual void OnCreate()override;
		virtual ~ScrollableControl() = default;
	};
}